package com.yukefms.rule.formula.interfaces;

/**
 * @Description
 * {@code StageBAFormula} is to specify target actions and dynamic actions in certain order, e.g., sequential order.
 * Comparing to StaticBAFormula,the matching logic of {@link StageBAFormula} is matching each Stage,i.e., Response,
 * by certain order at several time points, rather than at one time point.
 * The StageBAFormula could specify multi-desired actions which need to meet at several time points by performing
 * multi-dynamic actions.
 *
 * StageBAFormula consists of Simple and Composition one (Sequential in default) .
 * @Author Ping
 * @Date 2021/8/19 16:09
 **/
public interface StageBAFormula extends StaticBAFormula {
    /**
     * check if there is next unfinished stage
     * @return
     */
    boolean hasNextStage() ;

    /**
     * return next unfinished stage
     * @return
     */
    StageBAFormula nextStage() ;

    /**
     * return current doing stage
     * @return
     */
    StageBAFormula currentStage() ;

    /**
     * add more stages
     * @param stage
     * @return
     */
    StageBAFormula add(StageBAFormula stage) ;

    /**
     * get dynamic part for current stage
     * @return
     */
    DynamicBAFormula dynamic() ;

    /**
     * get response part for current stage.
     * @return
     */
    StaticBAFormula response() ;

    /**
     * reset to the first stage. If the stageBAFormula is simpleBAformula ,then do nothing,
     * ow, reset current stage to the first .
     */
    default void reset() {

    }




}
